package com.yixin.hospital.mapper.extend;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yixin.hospital.entity.domain.DrugDepositoryDrug;
import com.yixin.hospital.entity.vo.DrugDepositoryDrugVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface DrugDepositoryDrugExtendMapper extends BaseMapper<DrugDepositoryDrug> {
    DrugDepositoryDrugVo countDepository(@Param("depositoryId") Long depositoryId, @Param("drugCode")String DrugCode);

    IPage<DrugDepositoryDrugVo> DepositoryCountListPage(Page<Object> page, @Param("depositoryIds") List<Long> depositoryIds, @Param("drugName") String drugName, Integer isProductTime);

    List<DrugDepositoryDrugVo> DepositoryCountList(@Param("depositoryIds") List<Long> depositoryIds, @Param("drugCode") String drugCode);

    List<DrugDepositoryDrugVo> depositoryCountAllList(@Param("drugCode")String DrugCode);

    DrugDepositoryDrugVo getOneInventory(@Param("depositoryId") Long depositoryId, @Param("drugCode") String DrugCode, @Param("productTime") Date productTime, @Param("expiration") Date expiration);

    int updateInventory(@Param("id") Long  id, @Param("oldNum") Integer oldNum, @Param("oldSubNum") Integer oldSubNum, @Param("num") Integer num, @Param("subNum") Integer subNum);

}




